package edu.tongji.jiaowu.webapp.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.multiaction.MultiActionController;

import com.tongji.quickCRUDQ.util.ApplicationContextUtil;
import com.tongji.quickCRUDQ.util.RequestUtil;

import edu.tongji.jiaowu.service.ArrangeResultManager;
import edu.tongji.jiaowu.service.RestudyStudentManager;

public class RestudyController extends MultiActionController {
	private RestudyStudentManager restudyStudentManager;

	public ModelAndView loadRestudyStudents(HttpServletRequest request, HttpServletResponse response){
		try {
			String restudyYear=request.getParameter("restudyYear");
			String restudySemester=request.getParameter("restudySemester");
			restudyStudentManager.loadRestudyStudents(restudyYear,restudySemester);
			RequestUtil.writeJsonSuccess(response, "导入成功!");
		} catch (Exception e) {
			RequestUtil.writeJsonException(response, e);
		}
		return null;
	}	
	
	public RestudyStudentManager getRestudyStudentManager() {
		return restudyStudentManager;
	}

	public void setRestudyStudentManager(RestudyStudentManager restudyStudentManager) {
		this.restudyStudentManager = restudyStudentManager;
	}

}
